<?php echo $javascript->link(array('tinymce/jscripts/tiny_mce/tiny_mce_jquery.js'), true ); ?>
<script type="text/javascript">
$(function(){
	tinyMCE.execCommand('mceToggleEditor',false,'ContenidoContenido');	
});
</script>
<div class="Contenidos form">
<?php echo $form->create('Contenido');?>
<fieldset class="ui-corner-all">
 <legend class="ui-widget-header ui-corner-all ui-state-active"><?php __('Editar Contenido');?></legend>
  <div align="left" style="padding:1px 2px 1px 2px;"><?php $session->flash(); ?></div>
<?php
	echo $form->hidden('id');
	echo $form->input('codigo', array('size'=>10, 'readonly'=>true));	
    echo $form->input('titulo', array('type'=>'textArea', 'rows'=>3, 'cols'=>150));
    echo $form->input('contenido', array('type'=>'textArea', 'rows'=>5, 'cols'=>150,'class'=>'tinymce', 'style'=>'width: 80%;height:400px'));    
?>
<script>
	tinyMCE.init({		
		mode : "exact",
		elements: "cmp_descripcion",
		theme : "advanced",	
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,imagemanager",		
		theme_advanced_buttons1 : "abrir,guardar,newdocument,refrescar,previo,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,fontsizeselect",
		theme_advanced_buttons2 : "tablecontrols,code,preview",
		theme_advanced_buttons3 : "hr,removeformat,charmap,fullscreen,image,outdent,indent,propimpresora",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : false	
	}); 
</script>
</fieldset>
<div class="actions"><p>
<?php echo $form->submit('Guardar', array('div' => false,'class' => 'btnsave'));?>
<?php echo $html->link('Cancelar', array('action'=>'index'), array('class'=>'lnkbutton btncancel'));?>
</p></div>
<?php echo $form->end();?>
</div>